Optimal. Leaf size=326 \[ \frac{2\ 3^{3/4} \sqrt{2+\sqrt{3}} \sqrt{x^2-x+1} \sqrt{\frac{x^2-x+1}{\left (x+\sqrt{3}+1\right )^2}} (x+1)^{3/2} \left (7 a-5 \left (1-\sqrt{3}\right ) b\right ) \text{EllipticF}\left (\sin ^{-1}\left (\frac{x-\sqrt{3}+1}{x+\sqrt{3}+1}\right ),-7-4 \sqrt{3}\right )}{35 \sqrt{\frac{x+1}{\left (x+\sqrt{3}+1\right )^2}} \left (x^3+1\right )}+\frac{2}{35} \sqrt{x^2-x+1} \sqrt{x+1} \left (7 a x+5 b x^2\right )+\frac{6 b \sqrt{x^2-x+1} \sqrt{x+1}}{7 \left (x+\sqrt{3}+1\right )}-\frac{3 \sqrt [4]{3} \sqrt{2-\sqrt{3}} b \sqrt{x^2-x+1} \sqrt{\frac{x^2-x+1}{\left (x+\sqrt{3}+1\right )^2}} (x+1)^{3/2} E\left (\sin ^{-1}\left (\frac{x-\sqrt{3}+1}{x+\sqrt{3}+1}\right )|-7-4 \sqrt{3}\right )}{7 \sqrt{\frac{x+1}{\left (x+\sqrt{3}+1\right )^2}} \left (x^3+1\right )} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.143442, antiderivative size = 326, normalized size of antiderivative = 1., number of steps used = 5, number of rules used = 5, integrand size = 25, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.2, Rules used = {809, 1853, 1878, 218, 1877} \[ \frac{2}{35} \sqrt{x^2-x+1} \sqrt{x+1} \left (7 a x+5 b x^2\right )+\frac{2\ 3^{3/4} \sqrt{2+\sqrt{3}} \sqrt{x^2-x+1} \sqrt{\frac{x^2-x+1}{\left (x+\sqrt{3}+1\right )^2}} (x+1)^{3/2} \left (7 a-5 \left (1-\sqrt{3}\right ) b\right ) F\left (\sin ^{-1}\left (\frac{x-\sqrt{3}+1}{x+\sqrt{3}+1}\right )|-7-4 \sqrt{3}\right )}{35 \sqrt{\frac{x+1}{\left (x+\sqrt{3}+1\right )^2}} \left (x^3+1\right )}+\frac{6 b \sqrt{x^2-x+1} \sqrt{x+1}}{7 \left (x+\sqrt{3}+1\right )}-\frac{3 \sqrt [4]{3} \sqrt{2-\sqrt{3}} b \sqrt{x^2-x+1} \sqrt{\frac{x^2-x+1}{\left (x+\sqrt{3}+1\right )^2}} (x+1)^{3/2} E\left (\sin ^{-1}\left (\frac{x-\sqrt{3}+1}{x+\sqrt{3}+1}\right )|-7-4 \sqrt{3}\right )}{7 \sqrt{\frac{x+1}{\left (x+\sqrt{3}+1\right )^2}} \left (x^3+1\right )} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 809
Rule 1853
Rule 1878
Rule 218
Rule 1877
Rubi steps
\begin{align*} \int \sqrt{1+x} (a+b x) \sqrt{1-x+x^2} \, dx &=\frac{\left (\sqrt{1+x} \sqrt{1-x+x^2}\right ) \int (a+b x) \sqrt{1+x^3} \, dx}{\sqrt{1+x^3}}\\ &=\frac{2}{35} \sqrt{1+x} \sqrt{1-x+x^2} \left (7 a x+5 b x^2\right )+\frac{\left (3 \sqrt{1+x} \sqrt{1-x+x^2}\right ) \int \frac{\frac{2 a}{5}+\frac{2 b x}{7}}{\sqrt{1+x^3}} \, dx}{2 \sqrt{1+x^3}}\\ &=\frac{2}{35} \sqrt{1+x} \sqrt{1-x+x^2} \left (7 a x+5 b x^2\right )+\frac{\left (3 b \sqrt{1+x} \sqrt{1-x+x^2}\right ) \int \frac{1-\sqrt{3}+x}{\sqrt{1+x^3}} \, dx}{7 \sqrt{1+x^3}}+\frac{\left (3 \left (7 a-5 \left (1-\sqrt{3}\right ) b\right ) \sqrt{1+x} \sqrt{1-x+x^2}\right ) \int \frac{1}{\sqrt{1+x^3}} \, dx}{35 \sqrt{1+x^3}}\\ &=\frac{6 b \sqrt{1+x} \sqrt{1-x+x^2}}{7 \left (1+\sqrt{3}+x\right )}+\frac{2}{35} \sqrt{1+x} \sqrt{1-x+x^2} \left (7 a x+5 b x^2\right )-\frac{3 \sqrt [4]{3} \sqrt{2-\sqrt{3}} b (1+x)^{3/2} \sqrt{1-x+x^2} \sqrt{\frac{1-x+x^2}{\left (1+\sqrt{3}+x\right )^2}} E\left (\sin ^{-1}\left (\frac{1-\sqrt{3}+x}{1+\sqrt{3}+x}\right )|-7-4 \sqrt{3}\right )}{7 \sqrt{\frac{1+x}{\left (1+\sqrt{3}+x\right )^2}} \left (1+x^3\right )}+\frac{2\ 3^{3/4} \sqrt{2+\sqrt{3}} \left (7 a-5 \left (1-\sqrt{3}\right ) b\right ) (1+x)^{3/2} \sqrt{1-x+x^2} \sqrt{\frac{1-x+x^2}{\left (1+\sqrt{3}+x\right )^2}} F\left (\sin ^{-1}\left (\frac{1-\sqrt{3}+x}{1+\sqrt{3}+x}\right )|-7-4 \sqrt{3}\right )}{35 \sqrt{\frac{1+x}{\left (1+\sqrt{3}+x\right )^2}} \left (1+x^3\right )}\\ \end{align*}
Mathematica [C] time = 1.71769, size = 423, normalized size = 1.3 \[ \frac{2}{35} x \sqrt{x+1} \sqrt{x^2-x+1} (7 a+5 b x)-\frac{(x+1)^{3/2} \left (\frac{\sqrt{2} \sqrt{\frac{-\frac{6 i}{x+1}+\sqrt{3}+3 i}{\sqrt{3}+3 i}} \sqrt{\frac{\frac{6 i}{x+1}+\sqrt{3}-3 i}{\sqrt{3}-3 i}} \left (5 \left (3-i \sqrt{3}\right ) b-14 i \sqrt{3} a\right ) \text{EllipticF}\left (i \sinh ^{-1}\left (\frac{\sqrt{-\frac{6 i}{\sqrt{3}+3 i}}}{\sqrt{x+1}}\right ),\frac{\sqrt{3}+3 i}{-\sqrt{3}+3 i}\right )}{\sqrt{x+1}}-\frac{60 \sqrt{-\frac{i}{\sqrt{3}+3 i}} b \left (x^2-x+1\right )}{(x+1)^2}+\frac{15 i \sqrt{2} \left (\sqrt{3}+i\right ) b \sqrt{\frac{-\frac{6 i}{x+1}+\sqrt{3}+3 i}{\sqrt{3}+3 i}} \sqrt{\frac{\frac{6 i}{x+1}+\sqrt{3}-3 i}{\sqrt{3}-3 i}} E\left (i \sinh ^{-1}\left (\frac{\sqrt{-\frac{6 i}{3 i+\sqrt{3}}}}{\sqrt{x+1}}\right )|\frac{3 i+\sqrt{3}}{3 i-\sqrt{3}}\right )}{\sqrt{x+1}}\right )}{70 \sqrt{-\frac{i}{\sqrt{3}+3 i}} \sqrt{x^2-x+1}} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] time = 0.014, size = 596, normalized size = 1.8 \begin{align*} -{\frac{1}{35\,{x}^{3}+35}\sqrt{1+x}\sqrt{{x}^{2}-x+1} \left ( 21\,i\sqrt{-2\,{\frac{1+x}{-3+i\sqrt{3}}}}\sqrt{{\frac{i\sqrt{3}-2\,x+1}{i\sqrt{3}+3}}}\sqrt{{\frac{i\sqrt{3}+2\,x-1}{-3+i\sqrt{3}}}}{\it EllipticF} \left ( \sqrt{-2\,{\frac{1+x}{-3+i\sqrt{3}}}},\sqrt{-{\frac{-3+i\sqrt{3}}{i\sqrt{3}+3}}} \right ) \sqrt{3}a-15\,i\sqrt{-2\,{\frac{1+x}{-3+i\sqrt{3}}}}\sqrt{{\frac{i\sqrt{3}-2\,x+1}{i\sqrt{3}+3}}}\sqrt{{\frac{i\sqrt{3}+2\,x-1}{-3+i\sqrt{3}}}}{\it EllipticF} \left ( \sqrt{-2\,{\frac{1+x}{-3+i\sqrt{3}}}},\sqrt{-{\frac{-3+i\sqrt{3}}{i\sqrt{3}+3}}} \right ) \sqrt{3}b-10\,b{x}^{5}+90\,\sqrt{-2\,{\frac{1+x}{-3+i\sqrt{3}}}}\sqrt{{\frac{i\sqrt{3}-2\,x+1}{i\sqrt{3}+3}}}\sqrt{{\frac{i\sqrt{3}+2\,x-1}{-3+i\sqrt{3}}}}{\it EllipticE} \left ( \sqrt{-2\,{\frac{1+x}{-3+i\sqrt{3}}}},\sqrt{-{\frac{-3+i\sqrt{3}}{i\sqrt{3}+3}}} \right ) b-63\,\sqrt{-2\,{\frac{1+x}{-3+i\sqrt{3}}}}\sqrt{{\frac{i\sqrt{3}-2\,x+1}{i\sqrt{3}+3}}}\sqrt{{\frac{i\sqrt{3}+2\,x-1}{-3+i\sqrt{3}}}}{\it EllipticF} \left ( \sqrt{-2\,{\frac{1+x}{-3+i\sqrt{3}}}},\sqrt{-{\frac{-3+i\sqrt{3}}{i\sqrt{3}+3}}} \right ) a-45\,\sqrt{-2\,{\frac{1+x}{-3+i\sqrt{3}}}}\sqrt{{\frac{i\sqrt{3}-2\,x+1}{i\sqrt{3}+3}}}\sqrt{{\frac{i\sqrt{3}+2\,x-1}{-3+i\sqrt{3}}}}{\it EllipticF} \left ( \sqrt{-2\,{\frac{1+x}{-3+i\sqrt{3}}}},\sqrt{-{\frac{-3+i\sqrt{3}}{i\sqrt{3}+3}}} \right ) b-14\,a{x}^{4}-10\,b{x}^{2}-14\,ax \right ) } \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int{\left (b x + a\right )} \sqrt{x^{2} - x + 1} \sqrt{x + 1}\,{d x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [F] time = 0., size = 0, normalized size = 0. \begin{align*}{\rm integral}\left ({\left (b x + a\right )} \sqrt{x^{2} - x + 1} \sqrt{x + 1}, x\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \left (a + b x\right ) \sqrt{x + 1} \sqrt{x^{2} - x + 1}\, dx \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int{\left (b x + a\right )} \sqrt{x^{2} - x + 1} \sqrt{x + 1}\,{d x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]